<?php
/*
 * Evaluation
 * By Hylson, Helton and Jackson
 * Rio do Sul - Santa Catarina - BRASIL
 */

require_once ('moodleform_mod.php');

?>

<meta HTTP-EQUIV="Expires" content="01 Jan 2010 00:00:00 GMT" />
<meta HTTP-EQUIV="Cache-Control" content="no-cache" />

<?php

class mod_evaluation_mod_form extends moodleform_mod {
	
function definition() {
    global $COURSE;
    $mform   = $this->_form;

    $mform->addElement('text', 'name', get_string('evaluation_name', 'evaluation'), array('size'=>'64'));
    $mform->addElement('text', 'description', get_string('evaluation_description', 'evaluation'), array('size'=>'64','id'=>'id_link'));

    $opt = array();
    $opt[0] = get_string('opt_yes', 'evaluation');
    $opt[1] = get_string('opt_no', 'evaluation');

    $mform->addElement( 'radio' , 'ispublic' , get_string('evaluation_ispublic', 'evaluation') , get_string ( 'opt_yes', 'evaluation') , 1 , $attributes ) ;
    $mform->addElement( 'radio' , 'ispublic' , '' , get_string ( 'opt_no', 'evaluation') , 0 , $attributes ) ;

    $html = '<div class="radio_buttons">';
    $repeatarray[] = &$mform->createElement('html', $html);
    $repeatarray[] = &$mform->createElement('group', 'layout', '', $radio, '');
    $html = '</div>';

    $mform->setType('name', PARAM_TEXT);
    $mform->addRule('description', null, 'required', null, 'client');
    $mform->addRule('name', null, 'required', null, 'client');		
		
    $features = new stdClass;
    $features->groups = false;
    $features->groupings = true;
    $features->groupmembersonly = true;
    $this->standard_coursemodule_elements($features);

    // add standard buttons, common to all modules
    $includeGroups=false;
    $this->standard_coursemodule_elements($includeGroups);
    $this->add_action_buttons();
}	

}

?>
